package org.chim.springcloud.gatewayzuul;

import com.mop.springcloud.corebase.EnableMopAutoConfiguration;
import com.mop.springcloud.corebase.filter.PreCoreHeaderFilter;
import org.chim.springcloud.gatewayzuul.filter.PreRequestLogFilter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;

@EnableZuulProxy
@EnableCircuitBreaker
@EnableHystrixDashboard
@SpringBootApplication
@EnableMopAutoConfiguration
public class GatewayZuulApplication {

    @Bean
    public PreRequestLogFilter preRequestLogFilter() {
        return new PreRequestLogFilter();
    }

    @Bean
    public PreCoreHeaderFilter preCoreHeaderFilter() {
        return new PreCoreHeaderFilter();
    }

    public static void main(String[] args) {
        SpringApplication.run(GatewayZuulApplication.class, args);
    }
}
